#include "pythonenv.hh"
void *pythonenv()                                //确定版本
{   float version;
    printf("当前可供选择的python版本有3.10/3.9/3.8/3.7/3.6/2.7\n");
    std::cout<<"请输入3.10/3.9/3.8/3.7/3.6/2.7确认python安装版本"<<std::endl;   
    std::cin>>version;
    FILE* fp = fopen("./record.txt", "w+");
    fprintf(fp, "%f \n", version);
    fclose(fp);
}
float version_python_get()                             //读取版本
{   float ver;
    FILE* fp = fopen("./record.txt", "r+");
	fscanf(fp, "%f", ver);
    fclose(fp);
    return ver;
}
int ver_python_install(float version)                                       //安装指定版本
{
 installpython(std::to_string(version));   
}
int pythoncmd(std::string cmd,int version)                          //执行目标命令
{
        changepython(cmd,std::to_string(version));
}
